|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectga.core.algorithm.util.ClusterUtil
public final class ClusterUtil
Utility class for handling clusters.
| Constructor Summary | |
|---|---|
private |
ClusterUtil()
Instantiation is not allowed. |
| Method Summary | ||
|---|---|---|
static
|
assignFitness(java.util.List<org.apache.commons.math.stat.clustering.Cluster<T>> clusters,
T ind)
Assigns the fitness depending on the type of individual. |
|
static
|
assignIntervalFitness(org.apache.commons.math.stat.clustering.Cluster<T> cluster,
I ind)
Assigns an interval fitness if the individual is an instance of IIntervalFitness. |
|
static
|
assignNumericFitness(org.apache.commons.math.stat.clustering.Cluster<T> cluster,
I ind)
Assigns the fitness of one individual to all individuals of the cluster. |
|
static
|
calculateCentroid(java.util.Collection<T> c)
Calculates the centroid of the collection. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private ClusterUtil()
| Method Detail |
|---|
public static <T extends IClusterableIndividual<T>> T calculateCentroid(java.util.Collection<T> c)
T - The generic type of the individuals.c - Collection of individuals.
public static <T extends IClusterableIndividual<T>> void assignFitness(java.util.List<org.apache.commons.math.stat.clustering.Cluster<T>> clusters,
T ind)
T - The generic type of the individuals.clusters - The list of all clusters.ind - The individual that already has fitness assigned.assignNumericFitness(Cluster, IFitness),
assignIntervalFitness(Cluster, IIntervalFitness)
public static <T extends IClusterableIndividual<T>,I extends IIntervalFitness> void assignIntervalFitness(org.apache.commons.math.stat.clustering.Cluster<T> cluster,
I ind)
IIntervalFitness.
T - The generic type of the individuals.I - The generic type of the interval fitness individuals.cluster - The cluster.ind - The centroid of the cluster.
public static <T extends IClusterableIndividual<T>,I extends IFitness> void assignNumericFitness(org.apache.commons.math.stat.clustering.Cluster<T> cluster,
I ind)
T - The generic type of the individuals.I - The generic type of the interval fitness individuals.cluster - The cluster.ind - The centroid of the cluster.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||